<template>
  <div class="dashboard-editor-container">
    <div class="filter-container" style="margin-bottom: 20px;">
      <el-select v-model="recordTime" placeholder="本周" clearable style="width: 200px;" class="filter-item">
        <el-option v-for="item in importanceOptions" :key="item" :label="item" :value="item" />
      </el-select>
    </div>
    <el-row :gutter="32">
      <el-col :xs="24" :sm="24" :lg="12">
        <div class="chart-wrapper">
          <pie-chart :record-time="recordTime"></pie-chart>
        </div>
      </el-col>
      <el-col :xs="24" :sm="24" :lg="12">
        <div class="chart-wrapper">
          <raddar-chart :record-time="recordTime"></raddar-chart>
        </div>
      </el-col>
    </el-row>
    <transaction-table />
  </div>
</template>

<script>
import PieChart from './components/PieChart'
import RaddarChart from './components/RaddarChart'
import TransactionTable from './components/TransactionTable'

export default {
  name: "LogView",
  components: {
    PieChart,
    RaddarChart,
    TransactionTable
  },
  data() {
    return {
      recordTime: '本周',
      importanceOptions: ['今天', '本周', '本月'],
    }
  },
  methods: {
    handleFilter() {
      // if (this.listQuery.importance === '') {
      //   this.getList()
      // } else {
      //   if(this.listQuery.importance === '地点'){
      //     getByArea(this.listQuery.parameter).then(response => {
      //       this.list = response.result
      //     }).catch(error => {
      //       console.log(error)
      //     })
      //   }
      //   if(this.listQuery.importance === '事件类型'){
      //     getByType(this.listQuery.parameter).then(response => {
      //       this.list = response.result
      //     }).catch(error => {
      //       console.log(error)
      //     })
      //   }
      //}
    },
  }
}
</script>

<style scoped>
.dashboard-editor-container {
  padding: 32px;
  background-color: rgb(247, 247, 247);
  position: relative;
}
.chart-wrapper {
    background: #fff;
    padding: 16px 16px 0;
    margin-bottom: 32px;
  }
.blue-button {
  background-color: #E4F2F5;
  /* 其他样式属性 */
}
</style>

